<?php

class Ms_Model_Test extends Zend_Db_Table_Abstract
{
    protected $_name = "core_users";

    /**
     * 获得用户列表
     *
     * @param array $where
     */
    public function getUsers($where = array())
    {
        $select = $this->select();
        if (count($where) > 0){
            foreach ($where as $key=>$value){
                $select->where($key . " = ? ", $value);
            }
        }
        $results = $this->fetchAll($select);
        if ($results) {
            return $results;
        }
        else{
            return null;
        }
    }
    
    public function getTableName() {
        return $this->_name;
    }
}

